﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace QuotesDailyWebApp
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection connString = new SqlConnection("Data Source=JOYAL\\MYSQLSERVER;Initial Catalog=QuotesDB;Integrated Security=True;Pooling=False");
            SqlCommand cmd = new SqlCommand("SELECT * FROM QuotesTable",connString);
            connString.Open();
            SqlDataReader sda = cmd.ExecuteReader();
            while(sda.Read())
                ListBox1.Items.Add(sda["Quote"].ToString());
        }
                
    }
}